﻿#pragma once

#include "../Enums.h"
#include "ItemData.h"
#include <string>
#include <any>

class SelectInfo
{
public:
    int Index = 0;
    std::string Name = std::string::Empty;
    unsigned short Level = 0;
    MirClass Class = static_cast<MirClass>(0);
    MirGender Gender = static_cast<MirGender>(0);
    DateTime LastAccess;

    SelectInfo();

    SelectInfo(BinaryReader *reader);
    void Save(BinaryWriter *writer);
};

class Door
{
public:
    unsigned char index = 0;
    DoorState DoorState = static_cast<DoorState>(0);
    unsigned char ImageIndex = 0;
    long long LastTick = 0;
    Point *Location;
    virtual ~Door()
    {
        delete Location;
    }

};

class RankCharacterInfo
{
public:
    long long PlayerId = 0;
    std::string Name;
    MirClass Class = static_cast<MirClass>(0);
    int level = 0;

    long long Experience = 0; //clients shouldnt care about this only server
    std::any info; //again only keep this on server!

    RankCharacterInfo();
    RankCharacterInfo(BinaryReader *reader);
    void Save(BinaryWriter *writer);
};

class QuestItemReward
{
public:
    ItemInfo *Item;
    unsigned short Count = 1;

    virtual ~QuestItemReward()
    {
        delete Item;
    }

    QuestItemReward();

    QuestItemReward(BinaryReader *reader);

    void Save(BinaryWriter *writer);
};
